#ifndef CONTROLLER_H
#define CONTROLLER_H

#include "..\Data\data.h"
#include <vector>
using namespace std;

// enumerations
//--------------
enum PROP
{
 eyear,
 edate,
 ehour,
 elat,
 elng,
 eerror,
 estate,
 edepth,
 emag,
 etype,
 ecat,
 eIo,
 earea,
 eMw1,
 eMw2,
 eMw3,
 eMw,
 elocal,
 ecomment
};

#define CONTROLLER Controller::instance()



class Controller
{
public:
 //singleton
 static Controller& instance();

protected:
 //constructor
 Controller();
 //destructor
 virtual ~Controller();

public:
 void pushData(Data);
 void reset();
 vector<Data> getDataSheet();
 void setCalcMag(double _a1, double _b1, double _c1, double _a2, double _b2, double _c2, double _weightMb, double _weightA);
 void setCalcMag(double _a1, double _b1, double _c1, double _a2, double _b2, double _c2, double _weightMb[], double _weightA[]);
 void setCalcMag(double _a1[], double _b1[], double _c1[], double _a2[], double _b2[], double _c2[], double _weightMb[], double _weightA[]);
 void sort(PROP);
 void invert();
 bool calcMagSetted();
 string getCharacter();
 void setCharacter(string txt);
 
private:
 //singleton
 static Controller* m_controller;

 //further parameters
 vector<Data> m_dataSheet;
 bool m_calcMagSetted;
 string m_csv;

 
 // private methods


};


#endif 